<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h3>标题三</h3>
    <h3>标题三</h3>
    <h3>标题三</h3>
    <script>
        //类数组，伪数组，只能使用数组的读取方式和length属性，不能使用数组方法：push
        //arguments关键字
        //array.from()用于将上述转换为真正的数组
       function add(){
          console.log(arguments);//读取到10，20，30
          r1 = Array.from(arguments);
          r1.push(40);
          console.log(r1);
       }
       add(19,20,30);

       //元素集合
       let titles = document.querySelectorAll("h3");
       console.log(Array.from(titles));

       //为数组对象
       var user= {
        "0":"asda",
        "1":"43",
        "2":"nan",
        length:3
       }
       console.log(Array.from(user));
       //array.of()用于将一组数字转化为数组（类型无限制）
       console.log(Array.of(1,2,3));
       //开辟了三个空间
       console.log(Array(3));//[,,]


    </script>
</body>
</html>